package com.bocai.grainshop.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bocai.common.utils.PageUtils;
import com.bocai.grainshop.product.entity.AttrEntity;
import com.bocai.grainshop.product.vo.AttrRespVo;
import com.bocai.grainshop.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author SunJinBo
 * @email 2374461077@qq.com
 * @date 2022-03-01 17:02:36
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);
    /**
     * 根据分组id找到关联的所有属性
     *
     */
    List<AttrEntity>  getRelationAttr(Long attrgroupId);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    void saveAttr(AttrVo attr);

    PageUtils queryBasePage(Map<String, Object> params, Long catelogId, String type);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrRespVo attr);

    /**
     * @Author: SunJinbo
     * @Description  在指定属性中挑出检索属性
     * @Param [list]
     * @return java.util.List<java.lang.Long>
     * @Data Created in 2022/3/31 15:29
     */
    List<Long> selectAttrByAttrId(List<Long> list);
}

